package com.duoec.magichour.mapper;

import com.duoec.magichour.core.BaseMapper;
import com.duoec.magichour.pojo.ArticleComment;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ArticleCommentMapper extends BaseMapper<ArticleComment, Long> {

    List<ArticleComment> getComments(@Param("articleId") long articleId, @Param("skip") int skip, @Param("limit") int limit);

    /**
     * 将comment_status设置为-1，即逻辑删除
     * @param commentId
     */
    void delete(@Param("commentId") long commentId);

    boolean exists(@Param("articleId") long articleId, @Param("commentId") long commentId);
}